// 节流函数
export const throttle = function throttle(fn, delay) {
  let timer = null
  return ()=>{
    if(timer !== null){
      return
    }
    timer = true;
    setTimeout(()=>{
      fn();
      timer = null
    }, delay)
  }
};
